package com.codeoss.framework.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.codeoss.framework.request.InitDBRequest;
import com.codeoss.framework.response.InitDBResponse;
import com.codeoss.framework.service.IInitDBService;

@Controller
@RequestMapping("sys/initdb")
public class InitDBController {
	@Autowired
	private IInitDBService initDBService;
	
	@RequestMapping(value = "initdb", method = RequestMethod.POST)
	@ResponseBody
	public InitDBResponse initDB(@RequestBody InitDBRequest initDBRequest) {
		InitDBResponse initDBResponse=initDBService.initDB(initDBRequest);
		return initDBResponse;
	}
}
